<template>
    <div class="login-container">
        <div>账户：<input type="text" v-model="account"></div>
        <div>密码：<input type="password" v-model="password"></div>
        <div><el-button size="mini" type="primary" @click="submit">登陆</el-button></div>
      
    </div>
</template>
<style>
.login-container div{
    padding-top: 20px;
    }
</style>
<script>
import { METHODS } from 'http';
export default {
    data(){
        return{
            account:'',
            password:'',
        }

    },
    methods:{
        submit(){
            if(this.account!==''&&this.password!==''){
                sessionStorage.setItem('login',true)
                return this.$message({
                   type:'success',
                   message:'恭喜你，登陆成功！'
               })
            }
            this.$message.error('登陆账户密码不能为空')
        }
    }
}
</script>

